﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Forum.aspx.cs" Inherits="Forum" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>
        <asp:Literal ID="LiteralTitile" runat="server"></asp:Literal>
    </title>
    <link rel="stylesheet" type="text/css" href="styles/css.css" />

    <script type="text/javascript">
        function problem_search() {
            var probid = document.getElementById("problem_id").value;
            if (probid != null && probid != "") {
                document.getElementById("problem_btn").href += ('&probid=' + probid);
            }
        }

        function problem_search2(evt) {

            

            var evt = evt ? evt : (window.event ? window.event : null); //兼容IE和FF
            if (evt.keyCode == 13) {            
                var probid = document.getElementById("problem_id").value;
                if (probid != null && probid != "") {
                    var url = document.getElementById("problem_btn").href + ('&probid=' + probid);
                    location.href = url
                }
                //if (evt && evt.preventDefault)
                //阻止默认浏览器动作(W3C) 
                //    evt.preventDefault();
                //else
                //IE中阻止函数器默认动作的方式 
                //    window.event.returnValue = false;
                return false;
            }
            return true;
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <%@ register tagname="header" tagprefix="ucl" src="header.ascx" %>
        <ucl:header ID="Header1" runat="server" />
        <div id="main-wrap">
            <div id="forum-left">
                <%@ register tagname="navigation" tagprefix="ucl" src="navigation.ascx" %>
                <ucl:navigation ID="navigation" runat="server" />
                <div id="forum-description">
                    <asp:Literal ID="Literaldescription" runat="server"></asp:Literal>
                </div>
                <div id="form-title">
                    <div class="forum-newthread">
                        <asp:HyperLink ID="new_topic_button" Style=" display: block;" runat="server">发新帖子</asp:HyperLink>
                    </div>
                    <ul id="forum-filter">
                        <li>查看：</li>
                        <li><a id="show_all" runat="Server">全部</a></li>
                        <li>精华</li>
                        <li>我的帖子</li>
                        
                    </ul>
                    <div id="forum_problem_wrap" runat="Server">
                    <div style="float:left;margin-top:4px;">&nbsp;|&nbsp;题目号:
                    </div>
                    <input type="text" id="problem_id" onkeydown="return problem_search2(event);" runat="Server"/>
                    <a id="problem_btn" class="forum-newthread"  onclick="problem_search();" runat="Server" >搜索题目</a>
                    </div>
                    
                    <div class="clearfloat"></div>
                </div>
                <%@ register tagname="pagetab" tagprefix="ucl" src="indextab.ascx" %>
                <ucl:pagetab ID="PageTab1" url="forum.aspx?fid=1&curpage=" curpage="1" num_per_page="10"  runat="server" />

                <div id="forum-list">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <th width="380">话题</th>
                            <th width="80">作者</th>
                            <th width="40">浏览</th>
                            <th width="40">回复</th>
                            <th width="80">最后回复</th>
                        </tr>
                        <asp:Literal ID="Literal_topic" runat="server"></asp:Literal>
                    </table>
                </div>
                <ucl:pagetab ID="PageTab2" url="forum.aspx?fid=1&curpage=" curpage="1" num_per_page="10"  runat="server" />
            </div>
            <div id="forum-right">
            </div>
            <div class="clearfloat">
            </div>
        </div>
        <%@ register tagname="footer" tagprefix="ucl" src="footer.ascx" %>
        <ucl:footer runat="server" />
    </div>
    </form>
</body>
</html>
